package com.csaba.connector.model;

public class Customer extends AbstractRemoteObject
{
	private Bank bank;
	private String id;
	private String loginId;
	private String name;
	private String password;

	public Bank getBank()
	{
		return bank;
	}

	public void setBank( final Bank bank )
	{
		this.bank = bank;
	}

	public String getId()
	{
		return id;
	}

	public void setId( final String id )
	{
		this.id = id;
	}

	public String getName()
	{
		return name;
	}

	public void setName( final String name )
	{
		this.name = name;
	}

	public String getLoginId()
	{
		return loginId;
	}

	public void setLoginId( final String loginId )
	{
		this.loginId = loginId;
	}

	public String getPassword()
	{
		return password;
	}

	public void setPassword( final String password )
	{
		this.password = password;
	}

	@Override
	public boolean equals( final Object arg0 )
	{
		if ( arg0 instanceof Customer )
		{
			final Customer other = (Customer) arg0;
			return other.bank.equals(bank) && other.loginId.equals(loginId);
		}
		return false;
	}

	@Override
	public String toString()
	{
		return getName();
	}

}
